home *** CD-ROM | disk | FTP | other *** search
/ The Works of John Ruskin / The Works of John Ruskin - Installation CD.iso / WorksSetup.exe / CTYPES.CPL < prev    next >
Text File  |  1995-10-02  |  6KB  |  245 lines

  1. ####################################################################
  2. #
  3. # File: ctypes.def
  4. #
  5. # Personal Library Software, July, 1993
  6. # Tom Donaldson
  7. # Function: Tokenizer definitional data for table driven tokenizer.
  8. # This file defines a vanilla isalnum() type of tokenization.  All
  9. # lower case letters are uppercased by canonizer.
  10. # The CplTabledRomanceTokenizer allows customization of tokenization by
  11. # editing rules that define the operation of the tokenizer.  Central
  12. # concept is "word continuation" rules, defining characters-kinds that 
  13. # CANNOT be split from each other.
  14. # History
  15. # -------
  16. #
  17. # 27aug93    tomd    Created from tknztbld.def
  18. #
  19. ####################################################################
  20.  
  21.  
  22.  
  23. ####################################################################
  24. # Installation
  25. # ============
  26. # Database.def File
  27. # -----------------
  28. # To use the CplTabledRomanceTokenizer, you need this line in the .def
  29. # file for the database:
  30. # TOKENIZER = CplTabledRomanceTokenizer
  31. # Tokenizer File
  32. # --------------
  33. # This file, ctypes.def, is the rule file.  The tokenizer REQUIRES that
  34. # its definition file be named "tknztbld.def".  Therefore, you MUST copy
  35. # this file as "tknztbld.def".  The "tknztbld.def" file MUST be in the
  36. # "home directory" of the database using the tokenizer, or the "system"
  37. # directory for the CPL installation.
  38. # Note that a tknztbld.def in the database's home directory takes
  39. # precedence over a tknztbld.def in the CPL "system" directory.
  40. #
  41. ####################################################################
  42.  
  43.  
  44.  
  45.  
  46. ####################################################################
  47. #
  48. # Section 1: Character Class Definitions
  49. #
  50. ####################################################################
  51.  
  52. The only rule needed for this C-type isalnum() style of tokenization
  53. is a "letter" rule.  All characters that can take part in a token must
  54. be classified as a "letter".  Such "letter" characters will be
  55. unconditionally included in tokens, and "letter" characters will be
  56. unconditionally considered inseparable.
  57.  
  58. # Name
  59. # ----
  60.   Letter
  61.  
  62.   EndRule
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ####################################################################
  71. #
  72. # Section 2: Character Classification Map
  73. #
  74. ####################################################################
  75.  
  76. # -------    -----        -----------------------
  77. # Decimal    Class
  78. #  Value    Name        Comment
  79. # -------    -----        -----------------------
  80.  
  81. # Digits: Note that they are classified as Letter, which is the only
  82. # character class defined.
  83.    48        Letter        # Char '0'
  84.    49        Letter        # Char '1'
  85.    50        Letter        # Char '2'
  86.    51        Letter        # Char '3'
  87.    52        Letter        # Char '4'
  88.    53        Letter        # Char '5'
  89.    54        Letter        # Char '6'
  90.    55        Letter        # Char '7'
  91.    56        Letter        # Char '8'
  92.    57        Letter        # Char '9'
  93.  
  94. # Upper case letters:
  95.    65        Letter        # Char 'A'
  96.    66        Letter        # Char 'B'
  97.    67        Letter        # Char 'C'
  98.    68        Letter        # Char 'D'
  99.    69        Letter        # Char 'E'
  100.    70        Letter        # Char 'F'
  101.    71        Letter        # Char 'G'
  102.    72        Letter        # Char 'H'
  103.    73        Letter        # Char 'I'
  104.    74        Letter        # Char 'J'
  105.    75        Letter        # Char 'K'
  106.    76        Letter        # Char 'L'
  107.    77        Letter        # Char 'M'
  108.    78        Letter        # Char 'N'
  109.    79        Letter        # Char 'O'
  110.    80        Letter        # Char 'P'
  111.    81        Letter        # Char 'Q'
  112.    82        Letter        # Char 'R'
  113.    83        Letter        # Char 'S'
  114.    84        Letter        # Char 'T'
  115.    85        Letter        # Char 'U'
  116.    86        Letter        # Char 'V'
  117.    87        Letter        # Char 'W'
  118.    88        Letter        # Char 'X'
  119.    89        Letter        # Char 'Y'
  120.    90        Letter        # Char 'Z'
  121.  
  122. # Lower case letters:
  123.    97        Letter        # Char 'a'
  124.    98        Letter        # Char 'b'
  125.    99        Letter        # Char 'c'
  126.    100        Letter        # Char 'd'
  127.    101        Letter        # Char 'e'
  128.    102        Letter        # Char 'f'
  129.    103        Letter        # Char 'g'
  130.    104        Letter        # Char 'h'
  131.    105        Letter        # Char 'i'
  132.    106        Letter        # Char 'j'
  133.    107        Letter        # Char 'k'
  134.    108        Letter        # Char 'l'
  135.    109        Letter        # Char 'm'
  136.    110        Letter        # Char 'n'
  137.    111        Letter        # Char 'o'
  138.    112        Letter        # Char 'p'
  139.    113        Letter        # Char 'q'
  140.    114        Letter        # Char 'r'
  141.    115        Letter        # Char 's'
  142.    116        Letter        # Char 't'
  143.    117        Letter        # Char 'u'
  144.    118        Letter        # Char 'v'
  145.    119        Letter        # Char 'w'
  146.    120        Letter        # Char 'x'
  147.    121        Letter        # Char 'y'
  148.    122        Letter        # Char 'z'
  149. # ---        -----        -----------------------
  150.    -1        EndOfDefs    # Not loaded.  Just marks end of map definition.
  151. # ---        -----        -----------------------
  152.  
  153.  
  154.    
  155.  
  156.  
  157.  
  158.  
  159. ####################################################################
  160. #
  161. # Section 3: Word Continuation Rules
  162. #
  163. ####################################################################
  164.  
  165. # There is only one rule.  Letter characters cannot be separated from
  166. each other, ever, and only Letter characters can be in tokens.
  167.  
  168. Letter    *
  169.  
  170. EndRule
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179. ####################################################################
  180. #
  181. # Section 4: Canonization Map
  182. #
  183. ####################################################################
  184.  
  185. # -------    -------        -----------
  186. #  Input    Output
  187. # Decimal    Decimal
  188. #  Char         Char
  189. #  Value     Value        Comment
  190. # -------    -------        -----------
  191. #
  192. # Map the characters a-z to the "canonical" characters A-Z.  That is,
  193. # all letters will be upper cased.
  194.    97        65        # Char 'a' canonizes to 'A'
  195.    98        66        # Char 'b' canonizes to 'B'
  196.    99        67        # Char 'c' canonizes to 'C'
  197.   100        68        # Char 'd' canonizes to 'D'
  198.   101        69        # Char 'e' canonizes to 'E'
  199.   102        70        # Char 'f' canonizes to 'F'
  200.   103        71        # Char 'g' canonizes to 'G'
  201.   104        72        # Char 'h' canonizes to 'H'
  202.   105        73        # Char 'i' canonizes to 'I'
  203.   106        74        # Char 'j' canonizes to 'J'
  204.   107        75        # Char 'k' canonizes to 'K'
  205.   108        76        # Char 'l' canonizes to 'L'
  206.   109        77        # Char 'm' canonizes to 'M'
  207.   110        78        # Char 'n' canonizes to 'N'
  208.   111        79        # Char 'o' canonizes to 'O'
  209.   112        80        # Char 'p' canonizes to 'P'
  210.   113        81        # Char 'q' canonizes to 'Q'
  211.   114        82        # Char 'r' canonizes to 'R'
  212.   115        83        # Char 's' canonizes to 'S'
  213.   116        84        # Char 't' canonizes to 'T'
  214.   117        85        # Char 'u' canonizes to 'U'
  215.   118        86        # Char 'v' canonizes to 'V'
  216.   119        87        # Char 'w' canonizes to 'W'
  217.   120        88        # Char 'x' canonizes to 'X'
  218.   121        89        # Char 'y' canonizes to 'Y'
  219.   122        90        # Char 'z' canonizes to 'Z'
  220.  
  221. # ---        -----        -----------------------
  222.    -1        -1        # Not loaded.  Just marks end of map definition.
  223. # ---        -----        -----------------------
  224.  
  225. ####################################################################
  226. #
  227. # End Of File: ctypes.def
  228. #
  229. ####################################################################
  230.